package com.study.arraylist;

import java.util.ArrayList;

public class ArrayListDemo1 {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        list.add("你好");
        list.add(6);
        list.add("java");
        list.add("你好");
        System.out.println(list);
        list.add(1,"呵呵");
        System.out.println(list);
        Object o = list.get(2);
        System.out.println(o);
        int size = list.size();
        System.out.println(size);
        System.out.println(list);
        list.remove(1);
        System.out.println(list);
        list.remove("java");
        System.out.println(list);
        list.set(1,7);
        System.out.println(list);
    }

}
